package com.example.springmb2.controller;


import com.example.springmb2.model.UserInfo;
import com.example.springmb2.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/user")
public class UserInfoController {
    @Autowired
    private UserInfoService userInfoService;

    @RequestMapping(value = "/getuserinfobyid")
    public UserInfo getUserInfoById(Integer id){
        if(id == null){
            return null;
        }
        return  userInfoService.getUserInfoById(id);
    }
}
